<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <script>
      var a = 10;
      var b = 15;
      var c = 20;
      var d = a > b ? (a > c ? a:c):(b > c ? b:c );
      console.log("d = "+ d)
      d = a < b ? (a < c ? a:c):(b < c ? b:c)
      console.log("d = "+ d);
  </script>
</body>
</html>